package com.woniu.userservice.controller;

import com.woniu.userservice.entity.Account;
import com.woniu.userservice.entity.ResultBody;
import com.woniu.userservice.service.AccountService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("account")
public class AccountController {
    @Resource
    private AccountService accountService;

    @GetMapping("selectOne")
    public Account selectOne(Integer id) {
        return accountService.queryById(id);
    }
  /**
  *@Author:huangjing
  *@Description:后台数据调用获取近七天的注册人数
  *@Date: 10:34 2020/3/24
  */

    @GetMapping("/registerCountByTime")
    @ResponseBody
    public List registerByTime(){
      List registerCount=  accountService.queryCountByTime();

      return registerCount;
    }

}